package com.ian.cloud;

import com.ian.client.PayServiceClient;
import com.ian.dto.MyDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 调用支付微服务
 */
@Controller
public class AliPayController {
    @Autowired
    PayServiceClient payServiceClient;

    @RequestMapping("/zhuan")
    @ResponseBody
    public MyDto zhuan(@RequestParam("out_biz_no") String out_biz_no, @RequestParam("payee_account") String payee_account, @RequestParam("payee_real_name") String payee_real_name, @RequestParam("amount") String amount) {
        payServiceClient.zhuan(out_biz_no, payee_account, payee_real_name, amount);
        return new MyDto(200, out_biz_no);
    }
}
